public class demo70 {
    class Solution {
        public boolean threeConsecutiveOdds(int[] arr) {
            int index=0;
            for(int i=0,j=1,k=2;k<arr.length;++i,++j,++k){
                if(arr[i]%2==1) index++;
                if(arr[j]%2==1) index++;
                if(arr[k]%2==1) index++;
                if(index==3) return true;
                else index=0;
            }
            return false;
        }
    }


}
